home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13805 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.5 KB  |  92 lines

  1. Path: freenet.vcu.edu!not-for-mail
  2. From: damurr@freenet.vcu.edu
  3. Newsgroups: comp.lang.c
  4. Subject: Please help w/seemingly simple problem...
  5. Date: 9 Apr 1996 11:55:27 -0400
  6. Organization: Central Virginia's Free-Net
  7. Distribution: world
  8. Message-ID: <4ke19f$m6r@freenet.vcu.edu>
  9. NNTP-Posting-Host: freenet.vcu.edu
  10.  
  11. /*
  12.  
  13. I'm hoping you guys can help me here... I have NO idea what's wrong
  14. with this code, but I can't get it to display the second screen
  15. that says, " - Options Menu - ". I can't go any further because it won't
  16. do anything beyond the first file id screen. The IDE debugger doesn't
  17. help me at all. 
  18.  
  19. Million thanks!
  20.  
  21. Regards,
  22. David Murr (damurr@freenet.vcu.edu - Please respond by e-mail if poss.)
  23.  
  24. BTW- I'm using Borland Turbo C++ 1.0
  25.  
  26. -------------------------------------------------------------------------
  27.  
  28. [ SOURCE START ]
  29.  
  30. -------------------------------------------------------------------------
  31. */
  32.  
  33. /* Pre-processor directives: */
  34.  
  35. #include <stdio.h>
  36. #include <conio.h>
  37. #include <panel.h>
  38. #include <bgl.h>
  39.  
  40. /* Other #include directives to go here, but they haven't been developed
  41.  * yet. Note that FG's scenery applets are 100% compatible with MSFS5.x
  42.  * .BGL files to utilize the vast amount of free scenery available on the
  43.  * Internet.
  44.  */
  45.  
  46. int main(void)
  47. {
  48.    clrscr();    /* Erases data from the screen */
  49.  
  50.    /* The following prints data to the screen in a blueish color, ~centered */
  51.  
  52.    int tclr;
  53.    tclr=3;
  54.    {
  55.        printf("\a");
  56.        textcolor(tclr);
  57.        cprintf("\n\n\n\n\n\n                      Initializing Flight Gear v1.0b...\r\n\n");
  58.        cprintf("              Copyright (c)1996 David Murr. All rights reserved.");
  59.    }
  60.  
  61.    /* Waits for the user to press <enter> before proceeding to Options menu */
  62.  
  63.    /* This is where the problem is... it just scrolls down as you press
  64.     * ENTER... should I be using some other escape sequence besides the
  65.     * carriage return... if so, how do I trap ENTER?
  66.    */
  67.  
  68.    printf("\n\n\n                            Please Press Enter.");
  69.  
  70.    #define string "\r"
  71.        scanf(string);
  72.  
  73.     if (string="\r"");
  74.     {
  75.         clrscr();
  76.         printf("                    - Options Menu - \n\n");
  77.     }
  78.  
  79. }
  80.  
  81. /*
  82.  *    Flight Gear History:
  83.  *           - v0.01: Initial release to alpha testers
  84.  */
  85.  
  86. /* End of source */
  87. -- 
  88.     _________  __
  89.    / __/ __/ |/ /__ _    _____  | Editor - FSNews
  90.   / _/_\ \/      -_) |/|/ (_-<  | http://user.aol.com/fsnews/
  91.  /_/ /___/_/|_/\__/|__,__/___)  | The leader in flight-sim news!
  92.